<?php

use yii\db\Migration;

class m170320_065323_init_sql extends Migration
{
    public function up()
    {
        $sql = " INSERT INTO user (username, auth_key, password_hash, email, created_at, updated_at) VALUES ('admin', 'W-qzFTg8HRqb2QlD_3_DcplklIky80Au', '\$2y\$13\$E4qlgvKdjMGMbJZzHb.7ReqH8BX0MBWKLBUAiaa.EsVysSHxbFCZu', 'admin@qq.com', 1489993665, 1489993665)";
        $this->execute($sql);
    }

    public function down()
    {
        $sql = "delete from user";
        $this->execute($sql);
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
